package com.appspot.aliga.persistence;

import javax.persistence.Id;

public class LeagueTableEntry {
	@Id
	private Long leagueTableEntryID;
	private String teamName;
	private int position;
	private int gamesPlayed;
	private int wins;
	private int ties;
	private int losses;
	private int points;
	private int goalesScored;
	private int goalesReceived;
	private int leagueID;
	
	
	public void addPoints(int points2) {
		this.points = this.points + points2;
	}
	
	public void addResult(int goalsScored, int goalsReceived) {
		this.goalesReceived = this.goalesReceived + goalsReceived;
		this.goalesScored = this.goalesScored + goalsScored;
	}
	
	public int getGoals() {
		return goalesScored - goalesReceived;
	}
	
	

	public Long getLeagueTableEntryID() {
		return leagueTableEntryID;
	}

	public void setLeagueTableEntryID(Long leagueTableEntryID) {
		this.leagueTableEntryID = leagueTableEntryID;
	}

	public String getTeamName() {
		return teamName;
	}

	public void setTeamName(String teamName) {
		this.teamName = teamName;
	}

	public int getPosition() {
		return position;
	}

	public void setPosition(int position) {
		this.position = position;
	}

	public int getGamesPlayed() {
		return gamesPlayed;
	}

	public void setGamesPlayed(int gamesPlayd) {
		this.gamesPlayed = gamesPlayd;
	}

	public int getWins() {
		return wins;
	}

	public void setWins(int wins) {
		this.wins = wins;
	}

	public int getTies() {
		return ties;
	}

	public void setTies(int ties) {
		this.ties = ties;
	}

	public int getLosses() {
		return losses;
	}

	public void setLosses(int losses) {
		this.losses = losses;
	}

	public int getPoints() {
		return points;
	}

	public void setPoints(int points) {
		this.points = points;
	}

	public int getGoalesScored() {
		return goalesScored;
	}

	public void setGoalesScored(int goalesScored) {
		this.goalesScored = goalesScored;
	}

	public int getGoalesReceived() {
		return goalesReceived;
	}

	public void setGoalesReceived(int goalesReceived) {
		this.goalesReceived = goalesReceived;
	}

	public int getLeagueID() {
		return leagueID;
	}

	public void setLeagueID(int leagueID) {
		this.leagueID = leagueID;
	}
}
